import 'package:flutter/material.dart';
import 'package:wallet/generated/l10n.dart';
import 'package:wallet/pages/web/web_page.dart';
import 'package:wallet/widget/BaseViewBar.dart';

class AboutPage extends StatefulWidget {
  @override
  _AboutPageState createState() => _AboutPageState();
}

class _AboutPageState extends State<AboutPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: BaseViewBar(
        preferredSize: Size.fromHeight(50.0),
        child: BaseTitleBar(
          S.of(context).about_us,
        ),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            title: Text(S.of(context).use_agreement),
            trailing: Icon(Icons.arrow_forward_ios),
            onTap: () {
              Navigator.of(context).push(MaterialPageRoute(
                  builder: (BuildContext context) =>
                      WebPage(S
                          .of(context)
                          .use_agreement,
                          "https://www.baidu.com")));
            },
          ),
          Container(
            height: 1,
            color: Colors.black12,
          ),
          ListTile(
            title: Text(S.of(context).privacy_clause),
            trailing: Icon(Icons.arrow_forward_ios),
            onTap: () {

            },
          ), Container(
            height: 1,
            color: Colors.black12,
          ),
          ListTile(
            title: Text(S.of(context).contact_us),
            trailing: Icon(Icons.arrow_forward_ios),
            onTap: () {

            },
          ), Container(
            height: 1,
            color: Colors.black12,
          ),
          ListTile(
            title: Text(S.of(context).help_center),
            trailing: Icon(Icons.arrow_forward_ios),
            onTap: () {

            },
          ), Container(
            height: 1,
            color: Colors.black12,
          ),
          ListTile(
            title: Text(S.of(context).feedback),
            trailing: Icon(Icons.arrow_forward_ios), onTap: () {

          },
          ), Container(
            height: 1,
            color: Colors.black12,
          ),
          ListTile(
            title: Text(S.of(context).version_log),
            trailing: Container(
              width: 60,
              child: Row(
                children: <Widget>[
                  Text("1.0.0"),
                  Icon(Icons.arrow_forward_ios)
                ],
              ),
            ),
            onTap: () {

            },
          ),
        ],
      ),
    );
  }
}
